package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Order;
import com.ruoyi.system.mapper.OrderMapper;
import com.ruoyi.system.service.IOrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements IOrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public int insertOrderBitchs(List<Order> orderList) {
        return orderMapper.insertOrderBitchs(orderList);
    }

    @Override
    public List<Order> selectOrderBySendId(String sendOrderId) {
        return orderMapper.selectOrderBySendId(sendOrderId);
    }

    @Override
    public int reciveOrder(@Param("actReciveCount")String actReciveCount, @Param("sendOrderId")String sendOrderId,@Param("gsConcentricityId")String gsConcentricityId) {
        return orderMapper.reciveOrder(actReciveCount,sendOrderId,gsConcentricityId);
    }

    @Override
    public int reciveCancelOrder(@Param("actReciveCount")String actReciveCount, @Param("sendOrderId")String sendOrderId,@Param("gsConcentricityId")String gsConcentricityId) {
        return orderMapper.reciveCancelOrder(actReciveCount,sendOrderId,gsConcentricityId);
    }

    @Override
    public List<Order> listOrder(Order order) {
        return orderMapper.listOrder(order);
    }

    @Override
    public List<Order> newListOrder(Order order) {
        return orderMapper.newListOrder(order);
    }

    @Override
    public String getSendOrderId(String preSendOrderId) {
        return orderMapper.getSendOrderId(preSendOrderId);
    }

    @Override
    public int updateOrderSendCount(String actSendCount, String gsOrderTempid,String sendOrderId,String gsConcentricityId) {
        return orderMapper.updateOrderSendCount(actSendCount,gsOrderTempid,sendOrderId,gsConcentricityId);
    }

    @Override
    public int cancelOrder(String gsOrderTempid, String gsConcentricityId) {
        return orderMapper.cancelOrder(gsOrderTempid,gsConcentricityId);
    }


    @Override
    public int printNewSendOrder(String id, String sendOrderId, String actSendCount,String createTime) {
        return orderMapper.printNewSendOrder(id,sendOrderId,actSendCount,createTime);
    }

    @Override
    public List<Order> searchSendOrder(String SendOrderId) {
        return orderMapper.searchSendOrder(SendOrderId);
    }
    @Override
    public List<Order> searchOrderStatus()
    {
        return orderMapper.searchOrderStatus();
    }
}
